import React from "react";
// import "./midden.css"
import ProtoType from "prop-types"
class Midden extends React.Component {
    static propTypes={
        minddens:ProtoType.array.isRequired,
        num:ProtoType.number.isRequired
    }
    static defaultProps={
        num:555
    }


    render() {
  
        let{minddens,num,fn}=this.props
        return <ul className="midden">
            <h1>{num}</h1>
            {
                minddens.map((iteam, index) => {
                    return <li onClick={fn(index)} id={iteam.bol ? "mi" : null} className="pp" key={index}><span>{iteam.title}</span>
                        {
                            iteam.bol ? <span>{iteam.degree}</span> : null
                        }
                    </li>

                })
            }

        </ul>
    }

}
export default
    Midden
